﻿package mortal.game.view.active11
{
    import com.mui.controls.*;
    import com.mui.display.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class Active11TabCell extends GSprite implements ITabBar2Cell
    {
        protected var _active11TabData:Active11TabData;
        protected var _categoryBg:ScaleBitmap;
        protected var _selectFilter:ScaleBitmap;
        protected var _txtName:GImageBitmap;

        public function Active11TabCell()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.mouseEnabled = true;
            this._categoryBg = UIFactory.bg(0, 0, 182, 60, this, ImagesConst.AchievemenListTabBtnBg);
            this._selectFilter = UIFactory.bg(-1, -1, 184, 62, this, ImagesConst.MountCardSelectBg);
            this._selectFilter.visible = false;
            this._txtName = UIFactory.gImageBitmap(ImagesConst.Active11TabCard, 24, 13, this);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._categoryBg.dispose();
            this._categoryBg = null;
            this._selectFilter.dispose();
            this._selectFilter = null;
            this._txtName.dispose();
            this._txtName = null;
            this._active11TabData = null;
            super.disposeImpl();
            return;
        }// end function

        public function set selected(param1:Boolean) : void
        {
            this._selectFilter.visible = param1;
            return;
        }// end function

        public function set data(param1:Object) : void
        {
            this._active11TabData = param1 as Active11TabData;
            this._txtName.imgUrl = this._active11TabData.getImageHead();
            return;
        }// end function

        public function over() : void
        {
            return;
        }// end function

        public function out() : void
        {
            return;
        }// end function

    }
}
